<div class="container-fluid">
    <div class="row-fluid">
        <div class="span3"><?php echo $this->partial('choix/menu.phtml') ?></div>
        <div class="span9">
            <div class="wrap">
                <div id="main-content">
                    <form class="form-horizontal" method="post" action="<?php echo $this->baseUrl('admin/payment/save') ?>">
                        <h3>Edition</h3>
                        <input type="hidden" name="num_vente" value="<?php echo $this->numVente ?>" />
                        <input type="hidden" name="id" value="<?php echo $this->object->getId() ?>" />
                        <div class="control-group">
                            <label class="control-label">Droit de suite ? </label>
                            <div class="controls">
                                <input type="checkbox" value="1" name="data[droit_suite]" <?php if ($this->object->getDroitSuite()) : ?>checked<?php endif ?> />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">N&deg; : </label>
                            <div class="controls">
                                <?php echo $this->object->getNumArticle() ?>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">D&eacute;posant : </label>
                            <div class="controls">
                                <select name="data[f_clients_deposant]">
                                    <?php foreach ($this->object->getClients() as $client) : ?>
                                    <option value="<?php echo $client['p_clients'] ?>" <?php if ($this->object->getFClientsDeposant() == $client['p_clients']) : ?>selected<?php endif ?>><?php echo $client['nom'] ?> <?php echo $client['prenom'] ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Adjug&eacute; : </label>
                            <div class="controls">
                                <input name="data[adjuge]" type="text" size="10" value="<?php echo $this->object->getAdjuge() ?>" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Acheteur : </label>
                            <div class="controls">
                                <?php $acheteur = $this->object->getAcheteur($this->object->getFClientsAcheteur(), $this->numVente) ?>
                                <input name="data[acheteur]" type="text" size="10" value="<?php echo $acheteur['num_client'] ?>" />
                                <?php echo $acheteur['nom'] ?> <?php echo $acheteur['prenom'] ?>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Comm sp&eacute;ciale : </label>
                            <div class="controls">
                                <input name="data[commission]" type="text" size="10" value="<?php echo $this->object->getCommission() != '99' ? $this->object->getCommission() : '' ?>" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">S&eacute;rie : </label>
                            <div class="controls">
                                <select name="data[f_series]">
                                    <?php foreach ($this->object->getSeries() as $serie) : ?>
                                    <option value="<?php echo $serie['p_series'] ?>" <?php if ($this->object->getFSeries() == $serie['p_series']) : ?>selected<?php endif ?>><?php echo $serie['titre'] ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">N&deg; identifiant : </label>
                            <div class="controls">
                                <input name="data[numero]" type="text" value="<?php echo $this->object->getNumero() ?>" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Sous-n&deg; : </label>
                            <div class="controls">
                                <input name="data[sous]" type="text" value="<?php echo $this->object->getSous() ?>" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Description courte : </label>
                            <div class="controls">
                                <textarea name="data[desc_courte]" style="width: 95%"><?php echo $this->object->getDescCourte() ?></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Description longue : </label>
                            <div class="controls">
                                <textarea name="data[desc_longue]" style="width: 95%"><?php echo $this->object->getDescLongue() ?></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Cat&eacute;gorie : </label>
                            <div class="controls">
                                <select name="data[f_categories]">
                                    <?php foreach ($this->object->getCategories($this->numVente) as $category) : ?>
                                    <option value="<?php echo $category['p_categories'] ?>" <?php if ($this->object->getFCategories() == $category['p_categories']) : ?>selected<?php endif ?>><?php echo $category['nom'] ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Estimation : </label>
                            <div class="controls">
                                <input name="data[estimation]" type="text" value="<?php echo $this->object->getEstimation() ?>" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">R&eacute;serve : </label>
                            <div class="controls">
                                <input name="data[reserve]" type="text" value="<?php echo $this->object->getReserve() ?>" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Caisse : </label>
                            <div class="controls">
                                <input name="data[caisse]" type="text" value="<?php echo $this->object->getCaisse() != 0 ? $this->object->getCaisse() : '' ?>" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Déplacer vers la vente : </label>
                            <div class="controls">
                                <select name="data[ventes]">
                                    <?php foreach ($this->object->getVentes() as $vente) : ?>
                                    <option value="<?php echo $vente['p_ventes'] ?>"><?php echo date('d/m/Y', strtotime($vente['dtvente'])) ?> - <?php echo $vente['titre'] ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                        <div align="center" style="width: 670px">
                            <ul class="inline">
                                <li style="display:block">
                                    <input class="btn btn-primary" type="submit" value="Sauver" name="submit" />
                                </li>
                            </ul>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>